package myky.com.doctorapp.model;

import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;
import myky.com.doctorapp.api.ApiManager;
import myky.com.doctorapp.entity.HealthEntity;
import myky.com.doctorapp.base.BaseEntity;
import myky.com.doctorapp.contract.NewSubFragmentContract;

public class NewSubFragmentModel implements NewSubFragmentContract.Model {

    @Override
    public Observable<BaseEntity<HealthEntity.PayLoadBean>> getHealthList(String tagId, String params) {
        return ApiManager.getApistore().getHealthList(tagId,params).subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread());
    }

    @Override
    public Observable<BaseEntity<HealthEntity.PayLoadBean>> getMoreHealthList(String tagId, String params) {
        return ApiManager.getApistore().getHealthList(tagId,params).subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread());
    }
}
